import React from 'react'
import "./seckill.less"
import { Carousel } from 'antd-mobile';
import { Link } from "react-router-dom"

function seckill(props) {
    let { seckilllist } = props

    return (
        <div className="new">
            <div className="bt"><h4>限时秒杀</h4></div>
            <Carousel className="space-carousel"
                cellSpacing={10}
                slideWidth={0.45}
                autoplay
                infinite
                dots={false}
            >
                {seckilllist.map((item) => (
                    <div key={item.id} className="lunbo">
                        <Link to={"/detail?id=" + item.id + "&type=1"}>
                            <img src={item.img} alt="" />
                            <div>
                                <p>{item.goodsname}</p>
                                <span>秒杀价：{item.price}</span>
                            </div>
                        </Link>

                    </div>
                ))}
            </Carousel>
            {/* {seckilllist.map((item) => (
                    <div className="list">
                        <img key={item.id} src={item.img} alt="" />
                        <div>
                            <p>{item.goodsname}</p>
                            <span>秒杀价：{item.price}</span>
                        </div>
                    </div>
                ))} */}
        </div>
    )
}
export default React.memo(seckill)